from django.urls import path
from rest_framework_jwt.views import obtain_jwt_token  # token模块
from .views import *
from rest_framework.routers import DefaultRouter,SimpleRouter  # 默认路由器

urlpatterns = [
    path('login/',obtain_jwt_token),
    # https://www.hake.cc/tools/uuid/
    # f2d8e6c7-e383-5a3b-97bb-b0e3205bc261
    path('image/verification/<uuid:uuid>/',ImageVerifyView.as_view()),
]

# 创建路由器
router = DefaultRouter()
# 注册路由器
router.register('users',UserViewSet)
router.register('area',AreaViewSet)
router.register('address',AddressViewSet,basename='address')
# 路由添加至urlpatterns列表当中
urlpatterns += router.urls
